package cn.ibdsr.human.constant;

import lombok.Getter;
import lombok.Setter;

/**
 * @description:
 * @author: cdl
 * @email: iamcimon@qq.com
 * @date: 2021/8/3 16:44
 */
public enum JobStatusEnum {
    /**
     * 正常状态
     */
    FINDING(0,"求职中"),
    /**
     * 已冻结状态
     */
    WORKING(1,"在职"),
    ;

    /**
     * 状态值
     */
    @Setter
    @Getter
    private int type;
    /**
     * 状态描述
     */
    @Setter
    @Getter
    private String desc;


    JobStatusEnum(int type, String desc){
        this.type =type;
        this.desc= desc;
    }

    public static JobStatusEnum valueOf(int status) {
        for (JobStatusEnum s : JobStatusEnum.values()) {
            if (s.getType() == status) {
                return s;
            }
        }
        return null;
    }
}
